<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //使用new来创建
        let arr=new Array();
        console.log(arr)
        //使用[]
        let arr1=[11,22,3,false,'111']
        console.log(arr1)

        //获取数组元素
        console.log(arr1[1])
        console.log(arr[10])//undefine

        //添加元素
        arr1.push(5)
        arr.push(7)
        console.log(arr1)

        arr1[10]=10;
        console.log(arr1)

        //删除
        arr1.splice(2,1)
        console.log(arr1)
    </script>
</body>
</html>